﻿using System.Threading.Channels;

namespace _57_C_二进制_八进制_十进制_十六进制之间相互转换
{
    internal class Program
    {
        static void Main(string[] args)
        {
            int num2 = 0B110;//6
            int num16 = 0XA;//10

            Console.WriteLine(num2);
            Console.WriteLine(num16);

            string num2to16 = Convert.ToString(num2, 16);//
            string num16to2 = Convert.ToString(num16, 2);
            string num2to8 = Convert.ToString(num2, 8);
            string num16to8 = Convert.ToString(num16, 8);
            Console.WriteLine(num16to8);

            Convert.ToInt32("100", 8);//8进制的100转换位10进制


            Console.ReadKey();
        }
    }
}
